using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace CTP.Entitys
{
    /// <summary>
    ///持仓信息((根据CTP返回的信息再定义)) 
    /// </summary>
    public struct PositionInformation
    {
        /// <summary>
        /// 资金账号
        /// </summary>
        public string UserAccount;
        /// <summary>
        /// 证券代码
        /// </summary>
        public string Symbol;
        /// <summary>
        /// 持仓方向
        /// </summary>
        public PosSide PosSide;
        /// <summary>
        /// 计量单位
        /// </summary>
        public Unit Unit;
        /// <summary>
        /// 持仓日期 对应CTP字段 PositionDate   
        /// </summary>
        public PositionDateType PositionDate;
        /// <summary>
        /// 上日持仓 对应CTP字段 YdPosition	  
        /// </summary>
        public double YdPosition;
        /// <summary>
        /// 今日持仓 对应CTP字段  Position
        /// </summary>
        public double TodayPosition;  
        /// <summary>
        /// 多头冻结 对应CTP字段  LongFrozen  
        /// </summary>
        public double MoreFrozen;  
        /// <summary>
        /// 空头冻结 对应CTP字段  ShortFrozen (double类型)
        /// </summary>
        public double ShortFrozen;  
        /// <summary>
        /// 开仓冻结金额 对应CTP字段 LongFrozenAmount
        /// </summary>
        public double OpenFrozenAmount;  
        /// <summary>
        /// 平仓冻结金额 对应CTP字段 ShortFrozenAmount
        /// </summary>
        public double CloseFrozenAmount;   
        /// <summary>
        /// 开仓量 对应CTP字段 OpenVoluem
        /// </summary>
        public double OpenVolume;  
        /// <summary>
        /// 平仓量 对应CTP字段 CloseVolume
        /// </summary>
        public double CloseVolume;  
        /// <summary>
        /// 持仓成本 对应CTP字段 PositionCost
        /// </summary>
        public double PositionCose;  
        /// <summary>
        /// 占用的保证金 对应CTP字段 PreMargin
        /// </summary>
        public double PreMargin;  
        /// <summary>
        /// 冻结的保证金 对应CTP字段 UseMargin
        /// </summary>
        public double UseMargin;  
        /// <summary>
        /// 投机套保标志
        /// </summary>
        public HedgeFlag HedgeFlag;   

    }
}
